/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package acervo.util;

import java.awt.Component;
import javax.swing.JTextArea;
import javax.swing.JTextField;

/**
 *
 * @author Fernando
 */
public class Tela {
    
    public static void HabilitaCampos(Component ... campos){
        for (int i = 0; i < campos.length; i++) {
            campos[i].setEnabled(true);            
        }
    }
    
    public static void DesabilitaCampos(Component ... campos){
        for (int i = 0; i < campos.length; i++) {
            campos[i].setEnabled(false);            
        }
    }
    
    public static void LimparCampos(JTextField ... component){        
        for (int i = 0; i < component.length; i++) {
            component[i].setText("");            
        }
    }
    
    public static void LimparCampos(JTextArea ... component){        
        for (int i = 0; i < component.length; i++) {
            component[i].setText("");            
        }        
    }   
       
}
